
import 'dart:async';
import '../utils/ApiService.dart';
import 'definitions/ResultNoticeModelList.dart';
import 'definitions/QueryNoticeParams.dart';
import 'definitions/ResultNoticeModel.dart';


class NoticeController {

    static String momentNoticeListUsingPostPath = "/api/notice/moment_notice_list";
    /// 1. 动态提醒消息列表
    static Future<ResultNoticeModelList> momentNoticeListUsingPost(QueryNoticeParams data,[ dynamic headers ]) async {
      var response = await ApiService.post("/api/notice/moment_notice_list", data.toJson() , headers);
      return ResultNoticeModelList()..fromJson(response.data);
    }
    
    static String lastMomentNoticeUsingPostPath = "/api/notice/moment_last_notice";
    /// 2. 最近的动态提醒消息
    static Future<ResultNoticeModel> lastMomentNoticeUsingPost([ dynamic headers ]) async {
      var response = await ApiService.post("/api/notice/moment_last_notice", null, headers);
      return ResultNoticeModel()..fromJson(response.data);
    }
    
    static String systemNoticeListUsingPostPath = "/api/notice/system_notice_list";
    /// 3. 系统公告消息列表
    static Future<ResultNoticeModelList> systemNoticeListUsingPost(QueryNoticeParams data,[ dynamic headers ]) async {
      var response = await ApiService.post("/api/notice/system_notice_list", data.toJson() , headers);
      return ResultNoticeModelList()..fromJson(response.data);
    }
    
    static String lastSystemNoticeUsingPostPath = "/api/notice/system_last_notice";
    /// 4. 最近的系统公告消息
    static Future<ResultNoticeModel> lastSystemNoticeUsingPost([ dynamic headers ]) async {
      var response = await ApiService.post("/api/notice/system_last_notice", null, headers);
      return ResultNoticeModel()..fromJson(response.data);
    }
    
    static String noticeListUsingPostPath = "/api/notice/notice_list";
    /// 5. 提醒消息列表
    static Future<ResultNoticeModelList> noticeListUsingPost(QueryNoticeParams data,[ dynamic headers ]) async {
      var response = await ApiService.post("/api/notice/notice_list", data.toJson() , headers);
      return ResultNoticeModelList()..fromJson(response.data);
    }
    
    static String lastNoticeUsingPostPath = "/api/notice/last_notice";
    /// 6. 最近的提醒消息
    static Future<ResultNoticeModel> lastNoticeUsingPost([ dynamic headers ]) async {
      var response = await ApiService.post("/api/notice/last_notice", null, headers);
      return ResultNoticeModel()..fromJson(response.data);
    }
    
}